package com.delu.controller;

import com.delu.data.Result;
import com.delu.em.ResultEnum;
import com.delu.entity.Cities;
import com.delu.mapper.CitiesSiteMapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.awt.*;
import java.util.List;


@RestController
@RequestMapping("cities")
@Api("网点管理")
public class CitiesController {
    @Resource
    private CitiesSiteMapper citiesSiteMapper;

    @GetMapping
    @ApiOperation("市网点管理")
    @ApiImplicitParam(name = "id",value = "市网点ID",required = true,paramType = "query")
    public Result selectCities(@RequestParam("id")Integer id){
        System.out.println("市网点信息" + id);
        List<Cities> citiesList = citiesSiteMapper.selectCities(id);
        return Result.response(ResultEnum.SUCCESS).setData(citiesList);
    }
}
